$(function () {
    window.onload = function () {
        $.ajax({
            url: 'http://localhost:3000/report/new',
            method: 'get',
            success: function (res) {
                console.log(res);
                var str = '';
                var srb = [];
                for (var i = 0; i < 7; i++) {
                    srb.push(res[i]);
                }
                $.each(srb, function (index, item) {
                    str += "<li>" +
                        "<img width='693px' src=" + item.img + ">" +
                        "<div class='http-div'>" +
                        "<p class='http-p1'>" + item.text + "</p>" +
                        "<p class='http-p2'>" +
                        "<span class='http-span1'>" + item.uName + "</span>" +
                        "<span class='http-span1'> " + item.endTime + "</span>" +
                        "<span class='http-span2'><img src='../img/图表img/zan.png'>3</span>" +
                        "<span class='http-span2'><img src='../img/图表img/reply.png'>3</span>" +
                        "</p>" +
                        "</div>" +
                        "<p class='http-p3'>关于" + item.text + "还有 4 篇报告，点击查看</p>"
                    "</li>"
                })
                $('.http-ul').html(str)
            }
        })
    }
})